package com.shop.entity;

import java.util.HashSet;
import java.util.Set;
/*CREATE TABLE merchant (
   `id` BIGINT(16) NOT NULL auto_increment PRIMARY KEY COMMENT '商户编号（主键）',
   `username` VARCHAR(16) NULL COMMENT '商户用户名称',
   `password` VARCHAR(16) NULL COMMENT '商户密码',
   `state` CHAR(6) NULL COMMENT '商户登录状态'
)ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;*/
/**
 * 
 * <b>商户<b>
 * <pre>
 * 
 * </pre>
 * @author 威 
 * <br>2018年1月2日 下午2:13:16 
 *
 */
public class Merchant {
	private Integer id ;
	private String username ;
	private String password ;
	private String state ;
	private Set<Goods> goodss = new HashSet<Goods>() ;  					//关联表	1：n
	private Set<MerchantAddress> merchantAddress = new HashSet<MerchantAddress>() ;  	//关联的表 	1：n
	private MerchantInfor merchantInfor ; 			//关联的表	1:1		需要双向关联
	private Set<MerchantOrder> merchantOrder = new HashSet<MerchantOrder>() ;			//关联表
	private Set<MerchantMessage> merchantMessage = new HashSet<MerchantMessage>() ;
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Set<Goods> getGoodss() {
		return goodss;
	}

	public void setGoodss(Set<Goods> goodss) {
		this.goodss = goodss;
	}

	public Set<MerchantAddress> getMerchantAddress() {
		return merchantAddress;
	}

	public void setMerchantAddress(Set<MerchantAddress> merchantAddress) {
		this.merchantAddress = merchantAddress;
	}

	public MerchantInfor getMerchantInfor() {
		return merchantInfor;
	}

	public void setMerchantInfor(MerchantInfor merchantInfor) {
		this.merchantInfor = merchantInfor;
	}

	public Set<MerchantOrder> getMerchantOrder() {
		return merchantOrder;
	}

	public void setMerchantOrder(Set<MerchantOrder> merchantOrder) {
		this.merchantOrder = merchantOrder;
	}

	public Set<MerchantMessage> getMerchantMessage() {
		return merchantMessage;
	}

	public void setMerchantMessage(Set<MerchantMessage> merchantMessage) {
		this.merchantMessage = merchantMessage;
	}

	public String toString (){
		return "Member[id="+id+
				",username="+username+
				",password="+password+
				",state="+state+
				",goodssSize="+goodss.size()+
				",merchantAddressSize="+merchantAddress.size()+
				",merchantInforId="+merchantInfor.getId()+
				",merchantMessageSize="+merchantMessage.size()+
				",merchantOrderSize="+merchantOrder.size()+"]" ;
	}
}
